<template>
  <div class="auto">
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>询问用户是否有安装验收合格证--------------------------{{user[0].certificate === 0 ? '否' : (user[0].certificate === 1 ? '是' : '')}}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>询问用户安装燃气具后是否改动--------------------------{{user[0].change === 0 ? '否' :(user[0].change === 1 ? '是' : '')}}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>询问用户购气所用设备是否登记--------------------------{{user[0].register === 0 ? '否' :(user[0].register === 1 ? '是' : '')}}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>询问用户是否改变燃气具用气环境--------------------------{{user[0].gasenvironment === 0 ? '否' : (user[0].gasenvironment === 1 ? '是' : '') }}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>询问用户是否改变燃气具供电电路--------------------------{{user[0].circuit === 0 ? '否' : (user[0].circuit === 1 ? '是' : '') }}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>气表运行正常--------------------------{{user[0].gasmeteroperation === 0 ? '否' : (user[0].gasmeteroperation === 1 ? '是' : '') }}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>室外立管泄露报警--------------------------{{user[0].outdoorriser === 0 ? '否' : (user[0].outdoorriser === 1 ? '是' : '') }}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>引入管泄露报警--------------------------{{user[0].introductiontube === 0 ? '否' : (user[0].introductiontube === 1 ? '是' : '') }}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>室内支管泄露报警--------------------------{{user[0].interiorbranchpipe === 0 ? '否' : (user[0].interiorbranchpipe === 1 ? '是' : '') }}</span>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-4"></div>
    <span>室内阀门泄露报警--------------------------{{user[0].indoorvalve === 0 ? '否' : (user[0].indoorvalve === 1 ? '是' : '') }}</span>
  </div><br/><br/>
  <div class="col-sm-12" >
    <div class="col-sm-4"></div>
    <div class="col-sm-1">
      <span class="col-sm-5;form-control-static" >热水器</span>
      </div>
      <div class="col-sm-1">
      <span class="col-sm-3;form-control-static" >数量</span>
      <span class="col-sm-3;form-control-static" >{{user[0].f_waterheater_quantity}}</span>
      </div>
  </div><br/><br/>
  <div class="col-sm-12" >
    <div class="col-sm-4"></div>
    <div class="col-sm-1">
      <span class="col-sm-5;form-control-static" >壁挂炉</span>
      </div>
      <div class="col-sm-1">
      <span class="col-sm-3;form-control-static" >数量</span>
      <span class="col-sm-3;form-control-static" >{{user[0].f_wall_hungboiler_quantity}}</span>
      </div>
  </div><br/><br/>
  <div class="col-sm-12" >
    <div class="col-sm-4"></div>
    <div class="col-sm-1">
      <span class="col-sm-5;form-control-static" >灶具</span>
      </div>
      <div class="col-sm-1">
      <span class="col-sm-3;form-control-static" >数量</span>
      <span class="col-sm-3;form-control-static" >{{user[0].f_kitchennums}}</span>
      </div>
  </div><br/><br/>
  <div class="col-sm-12">
    <div class="col-sm-10"></div>
    <button class="btn btn-primary width-80" @click="$back()" v-el:cx>返回</button>
  </div>
  </div>
</template>

<script>
import co from 'co'
import { PagedList } from 'vue-client'
import * as Util from '../Util'
let checkplan = function * (self) {
  let condition = `f_userid=${self.data.f_userid} and f_checkid=${self.data.id} `
  console.log('123');
  console.log(self.data.id);
 yield self.$post('rs/sql/singleTable_OrderBy', {data:{items:'*',tablename:'t_equipmentinspection',
  condition:condition,orderitem:'f_userid'}},
   {resolveMsg: null, rejectMsg: null})
  .then ((res)=> {
    self.user = res.data
  })
  .catch ((res)=> {
    self.$showMessage('获取用户数据失败')
  })
}
export default {
  title: '设备信息',
  data () {
    return {
      user:[]
    }
  },
  props: ['data'],
  ready () {
    let gen = checkplan(this)
    co(gen)
  },
  methods: {
    search () {

    },
  }
}
</script>
<style media="screen">
  .divtext {
    min-width: 50px;
    max-width: 200px;
    border: 1px solid green;
    display: inline-block;
  }
</style>
